// ReaderQueryDlg.cpp : implementation file
//

#include "stdafx.h"
#include "library.h"
#include "ReaderQueryDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CReaderQueryDlg dialog


CReaderQueryDlg::CReaderQueryDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CReaderQueryDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CReaderQueryDlg)
	m_strID = _T("");
	//}}AFX_DATA_INIT
	m_bState = FALSE;
}


void CReaderQueryDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CReaderQueryDlg)
	DDX_Text(pDX, IDC_READER_QUERY_EDIT, m_strID);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CReaderQueryDlg, CDialog)
	//{{AFX_MSG_MAP(CReaderQueryDlg)
	ON_BN_CLICKED(IDC_READER_QUERY_CANCEL_BUTTON, OnReaderQueryCancelButton)
	ON_BN_CLICKED(IDC_READER_QUERY_OK_BUTTON, OnReaderQueryOkButton)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CReaderQueryDlg message handlers

void CReaderQueryDlg::OnReaderQueryCancelButton() 
{
	// TODO: Add your control notification handler code here
	m_bState = FALSE;
	CDialog::OnCancel();
}

void CReaderQueryDlg::OnReaderQueryOkButton() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	m_bState = TRUE;
	CDialog::OnOK();
}

int CReaderQueryDlg::DoModal() 
{
	// TODO: Add your specialized code here and/or call the base class
	CDialog::DoModal();
	return m_bState;
}
